<style type="text/css">
body{background:#eee}
.storelogo img{width:3.2rem;height:3.2rem}
.merchgroup .store-star {padding:0.1rem 0 0.2rem 0;font-size:0.55rem;line-height:1rem}
.merchgroup .store-star img{height:0.66rem}
.star-on,.star-off{position:absolute;top:1rem;left:0;overflow:hidden}
.star-rate {margin-left:3.6rem}
.store-distance{float:right;color:#999}
.store-moneylimit{font-size:0.55rem}
.weui_cell_hd {
    padding: 0.6rem;
	padding-left: 0;
}
.weui_cells_text {padding:0 10px;padding-top:10px}
p {
    margin: 0 0 2px;
}
.fui-number .minus:before, .fui-number .plus:before {
	border-left: 0 solid #d9d9d9;
}
.fui-number .minus:after, .fui-number .plus:after {
	border-right: 0 solid #d9d9d9;
}
.fui-number:before {
	border-top: 0 solid #d9d9d9;
}
.fui-number:after {border-top: 0 solid #d9d9d9;}
.fui-number .num {
	color:#666;
}
.fui-number .num {
	color:#666;
}
.fui-number.small {
	height: 1.2rem;
	width: 3.6rem;
	line-height: 1.2rem;
}
.fui-number .minus, .fui-number .plus {
	z-index:0;
}
.fui-number.small .minus{
	color: {{main.syscolor || '#63BE72'}};
	padding-top:1px;
	border: 1px solid {{main.syscolor || '#63BE72'}};
	border-radius:50%;
}
 .fui-number.small .plus {
	color: #fff;
	padding-top:1px;
	background: {{main.syscolor || '#63BE72'}};
	border: 1px solid {{main.syscolor || '#63BE72'}};
	border-radius:50%;
}
</style>
<link rel="stylesheet" href="../core/resource/css/weui.css">
<div class="fui-page order-create-page fui-page-current" ng-if="pagedata.op == 'home'">
	 <div class="fui-header" style="background:#fff;">
		<div class="fui-header-left" ng-click="goback()">
            <a class="back"></a>
        </div>
		<div class="title">{{pagedata.title}}</div>
		<div class="fui-header-right"></div>
	</div>
	<div class="fui-content">
	    
	    
	    
	    <div id="carousel-container" class="carousel slide" data-role="carousel" data-param-auto="true" ng-if="pagedata.banner">
			<div class="carousel-inner" role="listbox" style="height:6rem">
        		<div ng-class="{'item':1,'active':$index==0}" ng-repeat="item in pagedata.banner">
        			<a href="{{item.url}}">
        				<img ng-src="{{tomedia(item.picurl) || '../core/resource/images/banner-1.jpg'}}" style="display: block; width: 100%; height: 100%;">
        			</a>
        		</div>
		    </div>
			<style>
					.fui-swipe-page .fui-swipe-bullet {background: {background}; opacity: {opacity};}
					.fui-swipe-page .fui-swipe-bullet.active {opacity: 1;}
			</style>
			<div id="carousel-jinyun" class="fui-swipe-page" style="padding: 0 5px; bottom: 10px; ">
				<div class="fui-swipe-bullet" ng-repeat="item in pagedata.banner" ng-class="{'active':$index==0}" data-target="#carousel-container" data-slide-to="{{$index}}"></div>
			</div>
		</div>
		
		
		

		<div class="weui_cells weui_cells_form">
			<div ng-repeat="item in pagedata.post.fileds">
			
				<div class="weui-cell weui-cell_active" ng-if="item.type == 1">
                    <div class="weui-cell__hd"><label class="weui-label">{{item.title}}</label></div>
                    <div class="weui-cell__bd">
                        <input id="js_input" class="weui-input" type="text" ng-model="item.data" placeholder="请输入{{item.title}}"/>
                    </div>
                </div>
				<div class="weui-cell weui-cell_active" ng-if="item.type == 2">
                    <div class="weui-cell__hd"><label class="weui-label">{{item.title}}</label></div>
                    <div class="weui-cell__bd">
                        <input id="js_input" class="weui-input" placeholder="请输入{{item.title}}" type="number" ng-model="item.data" pattern="[0-9]*" />
                    </div>
                </div>
				<div class="weui_cell" ng-if="item.type == 3">
					<div class="weui_cell_hd"><label class="weui_label">{{item.title}}</label></div>
					<div class="weui_cell_bd weui_cell_primary">
						<ul class="weui_uploader_files" ng-if="item.data">
							  <li class="weui_uploader_file" style="background-image:url({{tomedia(item.data)}})"></li>
						</ul>
						<div class="weui_uploader_input_wrp">
							 <input class="weui_uploader_input" ng-click="up_file(item,'data','image')" accept="image/jpg,image/jpeg,image/png,image/gif" multiple="">
						</div>
					</div>
				</div>
				<div class="weui-cell weui-cell_active" ng-if="item.type == 4">
                    <div class="weui-cell__hd"><label class="weui-label">{{item.title}}</label></div>
    				<div ng-if="item.type == 4" class="weui_cells weui_cells_radio2">
    						<label class="weui_cell weui_check_label dashed" ng-repeat="(key,value) in item.value" style="float:left;text-align: center;">
    							<div class="weui_cell_ft" href="javascript:;"  ng-click="item.data=value;">
    								<input type="radio" class="weui_check" name="radio1">
    								<span class="weui_icon_checked"></span>
    							</div>
    							<div class="weui_cell_bd weui_cell_primary">
    								<span style="float:left;">{{value}}</span>
    							</div>
    						</label>
    				</div>	
				</div>
			
				
				
				<div class="weui-cell weui-cell_active" ng-if="item.type == 5">
                <div class="weui-cell__hd"><label class="weui-label">{{item.title}}</label></div>
				<div ng-if="item.type == 5" class="weui_cells weui_cells_checkbox" style="padding:0.5rem">
						<div class="fui-cell-label" style="margin-right:0.8rem;float:left;margin-bottom:0.2rem" ng-repeat="(key,value) in item.value">
							<input type="checkbox" ng-click="duoxuans(value,item,'data')" class="fui fui-checkbox fui-checkbox-danger verify-checkbox" value="{{key}}" id="s11"> {{value}}
						</div>
				</div>
				</div>
				<div class="weui-form__control-area" ng-if="item.type == 6">
                  <div class="weui-cells__group weui-cells__group_form">
                    <div class="weui-cells__title" style="padding: 0 16px;font-size: 16px;color: #000;">{{item.title}}</div>
                    <div class="weui-cells weui-cells_form">
                        <div class="weui-cell ">
                            <div class="weui-cell__bd">
                                <textarea class="weui-textarea" ng-model="item.data" placeholder="请输入{{item.title}}" rows="3"></textarea>
                                <div class="weui-textarea-counter"><span>0</span>/118</div>
                            </div>
                        </div>
                    </div>
                  </div>
                </div>
			</div>
        </div>
		<!--<div class="fui-navbar order-create-checkout">
			<a  href="javascript:;" class="nav-item btn btn-danger buybtn"  ng-click="post(pagedata.post,'jy_aixiaoyi/tjform/post/')">
				<div class="fee-tagup-nav">
					一键获取方案
				</div>
			</a>
		</div>-->
		<div class="fui-navbar order-create-checkout">
			<a  href="javascript:;" class="nav-item btn btn-danger buybtn" ng-click="pagedata.tjbd()">
				<div class="fee-tagup-nav">
					一键获取方案
				</div>
			</a>
		</div>
		<div id="loadingToast" style="display: none;">
            <div class="weui-mask_transparent"></div>
            <div class="weui-toast">
                <span class="weui-primary-loading weui-icon_toast">
                  <span class="weui-primary-loading__dot"></span>
                </span>
                <p class="weui-toast__content">正在生成中(需30~60秒)...</p>
            </div>
        </div>
</div>
</div>
<script type="text/javascript">

//提交
scope.pagedata.tjbd=function(msg){

    
	scope.post_json('/tjform/post/',scope.pagedata.post,function(data){
	    var $loadingToast = $('#loadingToast');
	    if ($loadingToast.css('display') != 'none') return;
        $loadingToast.fadeIn(100);
	    scope.get('jy_aixiaoyi/tjform/getmsg/msg='+data.chatmsg+'&logid='+data.logid+'&key='+data.key,function(res){
			
			//超时提醒
			if(res.fail==1){
				scope.$evalAsync();
				$loadingToast.fadeOut(100);
				setTimeout(function(){
					 location.reload();
				},500);
				return false;
			}
			if(res.msg){
				scope.$evalAsync();
				$loadingToast.fadeOut(100);
				setTimeout(function(){
					 location.href='../custom/index.php?i='+scope.pagedata.uniacid+'&p=jy_aixiaoyi&a=index';
				},500);
				
			}
		});	
	})
}
require(['bootstrap', 'hammer'], function($, Hammer){
	$('#carousel-container').carousel();
	var mc = new Hammer($('#carousel-container').get(0));
	mc.on("panleft", function(ev) {
		$('#carousel-container').carousel('next');
	});
	mc.on("panright", function(ev) {
		$('#carousel-container').carousel('prev');
	});
});
</script>